import {HttpClient} from '@angular/common/http';
import {Injectable} from '@angular/core';
import "rxjs/add/operator/map";
import {Observable} from "rxjs/Observable";


/*
  Generated class for the MyinfoProvider provider.

  See https://angular.io/guide/dependency-injection for more info on providers
  and Angular DI.
*/
/*export interface Myinfo {
    mobile: string,
    num: number,
    moul: number
}*/

@Injectable()
export class MyinfoProvider {
    dataUrl = 'assets/data/myinfo.json';

    constructor(public http: HttpClient) {
        console.log('Hello MyinfoProvider Provider');
    }

    getData(): Observable<any> {
        return this.http.get(this.dataUrl).map((data) => {
            console.log(data);
            return data;
        });
    }

}
